package com.dunshanasync.service.impl;

import com.dunshanasync.service.IndexSevice;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

/**
 * @author .dunshan
 * @program: dunshan-pef
 * @description: 查询
 * @date 2021-08-08 15:49:15
 */
@Log4j2
@Service
public class IndexSeviceImpl implements IndexSevice {

    @Autowired
    HttpServletRequest request;




    @Override
    public HashMap<String, Object> select() {
        HashMap<String, Object> map = new HashMap<>();
        String header = request.getHeader("7d");
        if ("7dGgroup".equals(header)) {
            log.info("压测流量调试经过路线");
            map.put("data", "压测流量");
            return map;
        } else {
            log.info("线上流量压测");
            map.put("data", "线上流量");
            return map;
        }
    }


}
